Learn R Programming

MuMIn (version 1.43.6)

Model utilities: Model utility functions

Description

These functions extract or calculate various values from provided fitted model objects(s). They are mainly meant for internal use.

coeffs extracts model coefficients;

getAllTerms extracts independent variable names from a model object;

coefTable extracts a table of coefficients, standard errors and associated degrees of freedom when possible;

get.response extracts response variable from fitted model object;

model.names generates shorthand (alpha)numeric names for one or several fitted models.

Usage

coeffs(model)

getAllTerms(x, ...) # S3 method for terms getAllTerms(x, intercept = FALSE, offset = TRUE, ...)

coefTable(model, ...) # S3 method for averaging coefTable(model, full = FALSE, adjust.se = TRUE, ...) # S3 method for lme coefTable(model, adjustSigma, ...) # S3 method for gee coefTable(model, ..., type = c("naive", "robust"))

get.response(x, data = NULL, ...)

model.names(object, ..., labels = NULL, use.letters = FALSE)

Arguments

model

a fitted model object.

object

a fitted model object or a list of such objects.

x

a fitted model object or a formula.

offset

should ‘offset’ terms be included?

intercept

should terms names include the intercept?

full, adjust.se

logical, apply to "averaging" objects. If full is TRUE, the full model averaged coefficients are returned, and subset-averaged ones otherwise. If adjust.se is TRUE, inflated standard errors are returned. See ‘Details’ in par.avg.

adjustSigma
type

for GEE models, the type of covariance estimator to calculate returned standard errors on. Either "naive" or "robust" (‘sandwich’).

labels

optionally, a character vector with names of all the terms, e.g. from a global model. model.names enumerates the model terms in order of their appearance in the list and in the models. Therefore changing the order of the models leads to different names. Providing labels prevents that.

in model.names, more fitted model objects. In coefTable arguments that are passed to appropriate vcov or summary method (e.g. dispersion parameter for glm may be used here). In get.response, if data is given, arguments to be passed to model.frame. In other functions may be silently ignored.

data

a data.frame, list or environment (or object coercible to a data.frame), containing the variables in x. Required only if x is a formula, otherwise it can be used to get the response variable for a different data set.

use.letters

logical, whether letters should be used instead of numeric codes.

Details

The functions coeffs, getAllTerms and coefTable provide interface between the model object and model.avg (and dredge). Custom methods can be written to provide support for additional classes of models.